﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;
using JXT.PrimaryKey.Batman.Core.Configuration;

namespace JXT.PrimaryKey.Batman.Domain.Repositories.SqlServer
{
    public static class SqlRepositoryExtensions
    {
        private static readonly int _zhLangId = 1;
        private static readonly int _enLangId = 2;

        public static int ToDatabaseLangId(this CultureInfo culture)
        {
            switch (culture.Name)
            {
                case "zh-CN":
                    return _zhLangId;
                case "en-US":
                    return _enLangId;
                default:
                    return _zhLangId;
            }
        }
    }
}
